package com.jl.sms.userdata;

import com.jl.sms.TransferLayerProtocol;
import com.jl.util.HexUtil;


public class TPUserData implements TransferLayerProtocol{
	
	private byte[] data;

	public TPUserData(byte[] data){
		this.data = data.clone();
	}
	
	public TPUserData(Byte[] data){
		this.data = HexUtil.unwrap(data);
	}
	
	@Override
	public byte[] value(){
		return this.data;
	}
	
	@Override
	public String valueAsString(){
		return HexUtil.toHexCompact(this.data);
	}
	
}
